import 'package:get/get.dart';
import 'package:flutter/material.dart';

import '../../util/image_util.dart';
import '../../util/widget_util.dart';

class ChangePwdPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final oldPwd = TextFormField(
      autofocus: false,
      obscureText: true,
      decoration: InputDecoration(
          hintText: '请输入密码',
          contentPadding: const EdgeInsets.fromLTRB(10.0, 2.0, 10.0, 10.0),
          enabledBorder: UnderlineInputBorder(
              borderSide:
                  BorderSide(color: Get.theme.dividerTheme.color!, width: 0.7)),
          focusedBorder: const UnderlineInputBorder(
              borderSide: BorderSide(color: Color(0xFF6AF7D8)))),
    );

    final password = TextFormField(
      autofocus: false,
      obscureText: true,
      decoration: InputDecoration(
          hintText: '请输入密码',
          contentPadding: const EdgeInsets.fromLTRB(10.0, 2.0, 10.0, 10.0),
          enabledBorder: UnderlineInputBorder(
              borderSide:
                  BorderSide(color: Get.theme.dividerTheme.color!, width: 0.7)),
          focusedBorder: const UnderlineInputBorder(
              borderSide: BorderSide(color: Color(0xFF6AF7D8)))),
    );

    final password1 = TextFormField(
      autofocus: false,
      obscureText: true,
      decoration: InputDecoration(
          hintText: '请再次输入密码',
          contentPadding: const EdgeInsets.fromLTRB(10.0, 2.0, 10.0, 10.0),
          enabledBorder: UnderlineInputBorder(
              borderSide:
                  BorderSide(color: Get.theme.dividerTheme.color!, width: 0.7)),
          focusedBorder: const UnderlineInputBorder(
              borderSide: BorderSide(color: Color(0xFF6AF7D8)))),
    );

    final regButton = WidgetUtil.btnWidget(title: "确定", clickCallback: () {});

    return Scaffold(
        appBar: AppBar(
          title: const Text(
            '修改密码',
          ),
        ),
        body: ListView(
          padding: const EdgeInsets.only(left: 24.0, right: 24.0, top: 20.0),
          children: <Widget>[
            loadAssetImage("logo", width: 100, height: 100),
            const SizedBox(height: 48.0),
            oldPwd,
            const SizedBox(height: 25.0),
            password,
            const SizedBox(height: 25.0),
            password1,
            const SizedBox(height: 24.0),
            regButton,
          ],
        ));
  }
}
